package com.amit.struts;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class EnquiryAction extends Action {
	
	
	
	
	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm af,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		EnquiryForm ef=(EnquiryForm) af;
		String result="success";
		
		System.out.println(ef.getFname());
		System.out.println(ef.getEmail());
		System.out.println(ef.getPhone());
		System.out.println(ef.getGender());
		System.out.println(ef.getTimings());
		System.out.println(ef.getRemarks());
		
		for(String c:ef.getCourse())
		{
			System.out.println(c);
		}
		
		
		ActionForward forward=mapping.findForward(result);
		
		
		return forward;
		
	}

}
